package cn.felord.conversion.api;

import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;

/**
 * The type Conversion api.
 *
 * @author Dax
 * @since 18 :09  2019-07-21
 */
@RestController
@RequestMapping("/convert")
public class ConversionApi {


    /**
     * Local date object.
     *
     * @param localDate the local date
     * @return the object
     */
    @GetMapping("/localDate")
    public Object localDate(@DateTimeFormat(pattern = "yyyyMMdd") LocalDate localDate) {
        return localDate;
    }
}
